$(function () {
         $.ajax({
             url:'/user/queryUserMessage',
             type:'get',
             success:function (result) {
                // console.log(result);
                 var html = template("userTpl", { result});
                 $("#user").html(html);
             }
         })
   

  //点击退出登录
    $('#logout').on('tap',function () {
        $.ajax({
            url:'/user/logout',
            type:'get',
            success:function (result) {
                if (result.success){
                    location.href = 'index.html';
                } else {
                    mui.toast('退出登录失败!')
                }
                
            }
        })
    })



});



